package com.example.administrator.newfragmentation.fragment.zhihu.second;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.administrator.newfragmentation.R;
import com.example.administrator.newfragmentation.fragment.zhihu.second.child.ViewPagerFragment;
import com.example.administrator.newfragmentation.fragmentMain.BaseFragment;
import com.example.administrator.newfragmentation.fragmentMain.BaseZhiHuFragment;

public class ZhiHuSecondFragment extends BaseZhiHuFragment {
    public static ZhiHuSecondFragment newInstance() {
        ZhiHuSecondFragment fragment = new ZhiHuSecondFragment();
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_zhi_hu_first, container, false);
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        if(savedInstanceState == null){
            loadRootFragment(R.id.fl_two_container, ViewPagerFragment.newInstance());
        }
    }
}
